from app import db

class Network(db.Model):
    id = db.Column(db.String(64), primary_key=True)
    name = db.Column(db.String(128), nullable=False)
    driver = db.Column(db.String(64), nullable=False)
    scope = db.Column(db.String(64), nullable=False)

    def to_dict(self):
        return {
            "id": self.id,
            "name": self.name,
            "driver": self.driver,
            "scope": self.scope
        }